/*    */ package nccloud.web.hrpbm.budgetmake.budgetmake.action;
/*    */ 
/*    */ import nc.itf.hrpbm.budgetmake.budgetmake.IBudgetMakeVOService;
/*    */ import nc.vo.pub.SuperVO;
/*    */ import nccloud.framework.core.env.Locator;
/*    */ import nccloud.framework.core.util.ArrayUtils;
/*    */ import nccloud.framework.service.ServiceLocator;
/*    */ import nccloud.framework.web.container.IRequest;
/*    */ import nccloud.framework.web.ui.config.Area;
/*    */ import nccloud.framework.web.ui.config.ITempletResource;
/*    */ import nccloud.framework.web.ui.config.PageTemplet;
/*    */ import nccloud.framework.web.ui.config.TempletQueryPara;
/*    */ import nccloud.framework.web.ui.model.PageInfo;
/*    */ import nccloud.web.codeplatform.framework.action.base.BaseAction;
/*    */ import nccloud.web.codeplatform.framework.action.base.RequestDTO;
/*    */ import nccloud.web.codeplatform.framework.action.base.RequstParamWapper;
/*    */ import nccloud.web.codeplatform.framework.action.base.VOTransform;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ListSlaveBudgetMakeVOAction
/*    */   extends BaseAction
/*    */ {
/*    */   public Object doAction(IRequest request, RequstParamWapper paramWapper) throws Throwable {
/*    */     SuperVO[] returnVOs;
/* 31 */     RequestDTO param = VOTransform.toVO(paramWapper.requestString, RequestDTO.class);
/* 32 */     String pk = param.getPk();
/* 33 */     String pageCode = param.getPageCode();
/* 34 */     String formId = param.getFormId();
/*    */     
/* 36 */     PageInfo pageInfo = param.getPageInfo();
/*    */     
/* 38 */     VOTransform tf = new VOTransform(null, pageCode);
/*    */ 
/*    */     
/* 41 */     ITempletResource resource = Locator.find(ITempletResource.class);
/* 42 */     TempletQueryPara templetQueryPara = new TempletQueryPara();
/* 43 */     templetQueryPara.setPagecode(pageCode);
/* 44 */     PageTemplet pageTemplet = resource.query(templetQueryPara);
/*    */     
/* 46 */     Area area = pageTemplet.getArea(formId);
/*    */     
/* 48 */     Class childClazz = Class.forName(area.getClazz());
/*    */ 
/*    */     
/* 51 */     IBudgetMakeVOService service = ServiceLocator.find(IBudgetMakeVOService.class);
/* 52 */     String[] allpks = service.queryChildPksByParentId(childClazz, pk);
/*    */ 
/*    */ 
/*    */     
/* 56 */     if (!ArrayUtils.isEmpty(allpks) && pageInfo != null) {
/* 57 */       String[] currentPagePks = paramWapper.pageResult(pageInfo, allpks);
/* 58 */       returnVOs = service.queryChildVOByPks(childClazz, currentPagePks);
/*    */     } else {
/* 60 */       returnVOs = service.queryChildVOByPks(childClazz, allpks);
/*    */     } 
/* 62 */     param.setAllpks(allpks);
/*    */ 
/*    */     
/* 65 */     return buildResult(param, false, null, returnVOs);
/*    */   }
/*    */ }


/* Location:              E:\xiaxin\home\hotwebs\nccloud\WEB-INF\classes\nccloud\web\hrpbm\budgetmake\budgetmake\action\ListSlaveBudgetMakeVOAction.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.0.7
 */